import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import AboutView from '@/views/AboutView.vue'
import WorksView from '@/views/WorksView.vue'
import NotFound from '@/views/NotFound.vue'
import MemberInfo from '@/views/MemberInfo.vue'
import BarrageView from '@/views/BarrageView.vue'

const routes = [
  {
    path: '/',
    component: HomeView
  },
  {
    path: '/about',
    component: AboutView
  },
  {
    path: '/works',
    component: WorksView
  },
  {
    path: '/barrage',
    component: BarrageView
  },
  {
    path: '/member/:name',
    component: MemberInfo
  },
  {
    path: '/:catchAll(.*)',
    component: NotFound
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
